0abcebe5d6d478ad8b25b089da1a03a38471a1ba,lib/src/test/java/com/auth0/jwt/JWTTest.java,JWTTest,shouldGetNotBefore,#,256

Before Change


        when(clock.getToday()).thenReturn(expectedDate);

        String token = "eyJhbGciOiJIUzI1NiJ9.eyJuYmYiOjE0Nzc1OTJ9.mWYSOPoNXstjKbZkKrqgkwPOQWEx3F3gMm6PMcfuJd8";
        DecodedJWT jwt = JWT.require(Algorithm.HMAC256("secret"))
                .build(clock)
                .verify(token);

        assertThat(jwt, is(notNullValue()));
        assertThat(jwt.getNotBefore(), is(instanceOf(Date.class)));

After Change


        when(clock.getToday()).thenReturn(expectedDate);

        String token = "eyJhbGciOiJIUzI1NiJ9.eyJuYmYiOjE0Nzc1OTJ9.mWYSOPoNXstjKbZkKrqgkwPOQWEx3F3gMm6PMcfuJd8";
        JWTVerifier.BaseVerification verification = (JWTVerifier.BaseVerification) JWT.require(Algorithm.HMAC256("secret"));
        DecodedJWT jwt = verification
                .build(clock)
                .verify(token);

        assertThat(jwt, is(notNullValue()));
        assertThat(jwt.getNotBefore(), is(instanceOf(Date.class)));